L2-nonexpansive neural networks

ABSTRACT

A training method, system, and computer program product include training a neural network including using two-sided ReLU as a non-linear function or norm-pooling as a non-linear function and increasing a confidence gap.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a related Application of co-pending U.S.patent application Ser. No. ______, IBM Docket No. P201805395US01, andco-pending U.S. patent application Ser. No. ______, IBM Docket No.P201805392U01, each of which is filed concurrently herewith, the entirecontents of which are incorporated herein by reference.

BACKGROUND

The present invention relates generally to a training method, and moreparticularly, but not by way of limitation, to a system, method, andcomputer program product for a class of well-conditioned neural networksin which a unit amount of change in the inputs causes at most a unitamount of change in the outputs or any of the internal layers.

Conventionally, artificial neural networks are often ill-conditionedsystems in that a small change in the inputs can cause significantchanges in the outputs. This results in poor robustness andvulnerability under adversarial attacks, which has been reported on avariety of networks including image classification, speech recognition,image captioning, and natural language processing (NLP). These issuesbring up both theoretical questions of how neural networks generalizeand practical concerns of security in applications.

SUMMARY

Based on the above, the inventors have identified a different approachto solve the conventional problem and demonstrate that a combination ofthe Lipschitz constant of a network from inputs to logits is no greaterthan 1 with respect to the L2-norm, the loss function explicitlymaximizes confidence gap, which is the difference between the largestand second largest logits of a classifier, and the network architecturerestricts confidence gaps as little as possible results in enhancedrobustness.

In an exemplary embodiment, the present invention provides acomputer-implemented training method for an L2 non-expansive neuralnetwork, the method including training a neural network including usingtwo-sided RELU as a non-linear function and increasing a confidence gapand further training such that the network comprises a non-expansivenetwork.

One or more other exemplary embodiments include a computer programproduct and a system, based on the method described above.

Other details and embodiments of the invention will be described below,so that the present contribution to the art can be better appreciated.Nonetheless, the invention is not limited in its application to suchdetails, phraseology, terminology, illustrations and/or arrangements setforth in the description or shown in the drawings. Rather, the inventionis capable of embodiments in addition to those described and of beingpracticed and carried out in various ways and should not be regarded aslimiting.

As such, those skilled in the art will appreciate that the conceptionupon which this disclosure is based may readily be utilized as a basisfor the designing of other structures, methods and systems for carryingout the several purposes of the present invention. It is important,therefore, that the claims be regarded as including such equivalentconstructions insofar as they do not depart from the spirit and scope ofthe present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Aspects of the invention will be better understood from the followingdetailed description of the exemplary embodiments of the invention withreference to the drawings, in which:

FIG. 1 exemplarily shows a high-level flow chart for a training method100 according to an embodiment of the present invention;

FIG. 2 exemplarily depicts an exemplary attack on a model found after1,000 and 10,000 iterations according to an embodiment of the presentinvention;

FIG. 3 exemplarily depicts accuracies of modified National Institute ofStandards and Technology (MNIST) classifiers under white-boxnon-targeted attacks with noise L2-norm limit of 3;

FIG. 4 exemplarily depicts accuracies of Canadian Institute for AdvancedResearch (CIFAR-10) classifiers under white-box non-targeted attackswith noise L2-norm limit of 1.5;

FIG. 5 exemplarily depicts results from a MNIST model without weightregularization according to an embodiment of the present invention;

FIG. 6 exemplarily depicts an accuracy of L2NNN classifiers underwhite-box non-targeted attacks with 1000 iterations and with noiseL∞-norm limit of o̧ according to an embodiment of the present invention;

FIG. 7 exemplarily depicts accuracy percentages of classifiers on testdata bin-sorted by the confidence gap according to an embodiment of thepresent invention;

FIG. 8 exemplarily depicts an accuracy comparison of MNIST classifiersthat are trained on noisy data according to an embodiment of the presentinvention;

FIG. 9 exemplarily depicts training-accuracy-versus-confidence-gaptrade-offpoints of L2NNNs on 50%-scrambled MNIST training labelsaccording to an embodiment of the present invention;

FIG. 10 exemplarily depicts original and distorted images of MNISTdigits in test set with the largest confidence gaps according to anembodiment of the present invention;

FIG. 11 exemplarily depicts original and distorted images of MNISTdigits in test set with the smallest confidence gaps according to anembodiment of the present invention;

FIG. 12 exemplarily depicts a misclassification of ‘5’ according to sometechniques;

FIG. 13 exemplarily depicts accuracies of non-L2NNN MNIST classifiersthat use a 4-layer architecture and that are trained on training datawith various amounts of scrambled labels according to an embodiment ofthe present invention;

FIG. 14 exemplarily depicts accuracies of non-L2NNN MNIST classifiersthat use a 22-layer architecture and that are trained on training datawith various amounts of scrambled labels according to an embodiment ofthe present invention;

FIG. 15 exemplarily depicts training-accuracy-versus-confidence-gaptrade-offpoints of L2NNNs on 25%-scrambled MNIST training labelsaccording to an embodiment of the present invention;

FIG. 16 exemplarily depicts training-accuracy-versus-confidence-gaptrade-off points of L2NNNs on 75%-scrambled MNIST training labelsaccording to an embodiment of the present invention;

FIG. 17 exemplarily depicts pooling according to an embodiment of thepresent invention;

FIG. 18 exemplarily depicts splitting and re-convergence according to anembodiment of the present invention;

FIG. 19 exemplarily depicts a loss function according to an embodimentof the present invention;

FIG. 20 depicts a cloud-computing node 10 according to an embodiment ofthe present invention;

FIG. 21 depicts a cloud-computing environment 50 according to anembodiment of the present invention; and

FIG. 22 depicts abstraction model layers according to an embodiment ofthe present invention.

DETAILED DESCRIPTION

The invention will now be described with reference to FIGS. 1-22, inwhich like reference numerals refer to like parts throughout. It isemphasized that, according to common practice, the various features ofthe drawings are not necessarily to scale. On the contrary, thedimensions of the various features can be arbitrarily expanded orreduced for clarity.

By way of introduction of the example depicted in FIG. 1, an embodimentof a training method 100 according to the present invention can includevarious steps for enhancing robustness of a neural network.

It is noted that an L2-non-expansive neural network (L2NNN) is bydefinition a well-conditioned system in that a unit amount of change inthe inputs causes at most a unit amount of change in the outputs or anyof the internal layers.

By way of introduction of the example depicted in FIG. 20, one or morecomputers of a computer system 12 according to an embodiment of thepresent invention can include a memory 28 having instructions stored ina storage system to perform the steps of FIG. 1.

Although one or more embodiments may be implemented in a cloudenvironment 50 (e.g., FIG. 22), it is nonetheless understood that thepresent invention can be implemented outside of the cloud environment.

With reference to FIG. 1, in step 101, a neural network is trainedincluding using two-sided RELU as a non-linear function or norm-poolingas a non-linear function (e.g., one of) and increasing a confidence gap.

With reference generally to FIGS. 1-19, a neural network is trainedincluding any two of controlling a Lipschitz constant, a network withtwo-faced RELU, a network with norm-pooling, and a loss function thatgrows faster than cross-entropy does. That is, the invention includes adifferent approach and demonstrates that a combination of the Lipschitzconstant of a network from inputs to logits is no greater than ‘1’ withrespect to the L2-norm (i.e., a first condition), the loss functionexplicitly maximizes a confidence gap, which is the difference betweenthe largest and second largest logits of a classifier (i.e., a secondcondition), and the network architecture restricts confidence gaps aslittle as possible which enhances robustness (i.e., a third condition).

Although a two-sided ReLU is discussed in detail below, the inventioncan include a multi-sided ReLU (i.e., two or more sided) as ageneralization of a two-sided ReLU. In a two-sided RELU, the inventioncomputes ReLU of x and −x. Said another way, the invention computesmin(x, 0) and max(x, 0). A generalization is to have three outputs 1) ifx<c_1 where x is produced, otherwise c_1, 2) if c_1<=x<c_2 x is producedand otherwise if x<c1, and produce c1 and otherwise c_2 and 3) if x<c_2,c_2 is produced and otherwise x. The basic point of this is that ratherthan breaking the number range into two intervals, as in the twosided-ReLU and having only one of the two values change as the inputchanges within that range, the invention has many intervals and the samenumber of outputs but only one of those outputs changes as the inputchanges provided that the input stays within the appropriate interval.

In other words, a function f(x) from R to R^(n), where n>=2, is called amulti-sided ReLU if and only if both these conditions hold. There existsa division of R into n intervals such that, within each interval,exactly one of f(x)'s outputs is not constant. There exist y_1, y_2, . .. , y_n such that they are either +1 or −1 and that y_1*f_1(x)+ . . .+y_n*f_n(x)=x.

The invention builds MNIST and CIFAR-10 classifiers, without needing anyadversarial training, which exceed the state of the art in robustnessagainst white-box L2-bounded adversarial attacks. The defense is evenstronger if adversarial training is added. It is noted that thesenetworks are referred to as ‘L2-non-expansive neural networks’ (L2NNNs).One exemplary advantage comes from a set of new techniques in theinvention in which include a weight regularization, which enforces thefirst condition, allows greater degrees of freedom in parametertraining, a new loss function that is specially designed for the secondcondition, and various layers are adapted in new ways for the thirdcondition, for example norm-pooling and two-sided ReLU.

To explain the invention, intuitions behind the second and thirdconditions are first considered. Indeed, consider a multi-classclassifier. Let g(x) denote its confidence gap for an input data pointx. If the classifier is a single L2NNN (or preferably multiple L2NNNs),then there is a guarantee (i.e., ‘Lemma 1’ discussed below) that theclassifier will not change its answer as long as the input x is modifiedby no more than an L2-norm of g(x)/√2 (g(x)/2 in case of multi-L2NNNclassifier).

Therefore, maximizing the average confidence gap directly boostsrobustness and this motivates the second condition. To explain the thirdcondition, the notion of preserving distance is introduced (i.e., thedistance between any pair of input vectors with two different labelsought to be preserved as much as possible at the outputs, while theinvention does not care about the distance between a pair with the samelabel). As such, let d (x₁, x₂) denote the L2-distance between theoutput logit-vectors for two input points x and x that have differentlabels and that are classified correctly. It is straightforward toverify the condition of g(x1)+g(x2)≤√2·d(x₁, x₂) (e.g., as shown belowin ‘Lemma 2’).

Therefore, a network that maximizes confidence gaps well must be onethat preserves distance well. Ultimately, some distances are preservedwhile others are lost, and ideally the decision of which distance tolose is made by parameter training rather than by artifacts of networkarchitecture. Hence, the third condition involves distance-preservingarchitecture choices that leave the decision to parameter training asmuch as possible.

In the implementation of the invention, the invention employs thestrategy of ‘divide and conquer’ and builds each layer as anon-expansive map with respect to the L2-norm. It is straightforward tosee that a feedforward network composed of non-expansive layers mustimplement a non-expansive map overall. How to adapt subtleties likerecursion and splitting-re-convergence is described later.

Moreover, besides being robust against adversarial noises, L2NNNs haveother desirable properties that are utilized by the invention. TheL2NNNs generalize better from noisy training labels than ordinarynetworks. For example, when 75% of MNIST training labels are randomized,an L2NNN still achieves 93.1% accuracy on the test set, in contrast to75.2% from the best ordinary network. The problem of explodinggradients, which is common in training ordinary networks, is avoidedbecause the gradient of any output with respect to any internal signalis bounded between ‘−1’ and ‘1’. Unlike ordinary networks, theconfidence gap of an L2NNN classifier is a quantitatively meaningfulindication of confidence on individual data points, and the average gapis an indication of generalization.

The method 100 adapts some individual operators in neural networks forL2NNNs. Discussions on splitting-re-convergence, recursion andnormalization are described later.

Described below is both the matrix-vector multiplication in a fullyconnected layer and the convolution calculation between input tensor andweight tensor in a convolution layer.

The convolution calculation can be viewed as a set of vector-matrixmultiplications. The invention makes shifted copies of the input tensorand shuffles the copies into a set of small vectors such that eachvector contains input entries in one tile and the invention reshapes theweight tensor into a matrix by flattening all but the dimension of theoutput filters. Then, a convolution is equivalent to multiplying each ofthe small vectors with the flattened weight matrix. Therefore, in bothcases, a basic operator is y=Wx. To be a non-expansive map with respectto the L2-norm, a necessary and sufficient condition is shown inequation (1) where p denotes the spectral radius of a matrix:

y ^(T) y≤x ^(T) x⇒x ^(T) W ^(T) Wx≤x ^(T) x,∀xε

^(N)ρ(W ^(T) W)≤  (1)

The exact condition of equation (1) is difficult to incorporate intotraining. Instead, the invention uses an upper bound (e.g., the spectralradius of a matrix is no greater than its natural L∞-norm). W^(T)W andWW^(T) have the same non-zero eigenvalues and hence the same spectralradius) as shown in equation (2):

$\begin{matrix}{{{{\rho \left( {W^{T}W} \right)} \leq {b(W)}}\overset{\Delta}{=}{\min \left( {{r\left( {W^{T}W} \right)},{r\left( {WW}^{T} \right)}} \right)}},{{{where}\mspace{14mu} {r(M)}} = {\max\limits_{i}{\sum\limits_{j}{M_{i,j}}}}}} & (2)\end{matrix}$

Equation (2) is where the inventive linear and convolution layers differfrom those in the conventional techniques because they require WW^(T) tobe an identity matrix, and it is straightforward to see thatconventional techniques are only one special case that makes b (W) equalto 1. Instead of forcing filters to be orthogonal to each other, theinvention bounds of b (W) provides parameter training with greaterdegrees of freedom (i.e., via summing matrix norms).

The invention uses equation (2) by replacing W with W′=W/√(b(W)) inweight multiplications, and this would enforce that the layer isstrictly non-expansive. Another technique is described later.

As mentioned, convolution can be viewed as a first layer of makingcopies and a second layer of vector-matrix multiplications. With theabove regularization, the multiplication layer is non-expansive. Hence,the invention only needs to ensure that the copying layer isnon-expansive. For filter size of K₁ by K₂ and strides of S₁ and S₂, theinput tensor is divided by a factor of √{square root over (┌K₁/S₁┐·┌K₂/S₂ ┐)}.

For a fully-connected layer or a convolution layer to satisfy the firstcondition, equation (1) is a necessary and sufficient condition.Equation (1) states that a certain property of this layer, namely aspectral radius of the product of this layer's weight matrix and itstranspose, is no greater than 1. There are multiple ways to achieveequation (1), and some are less computational than others. For example,if a method to achieve equation (1) overly constrains the weight matrix,then this layer will not do much useful work. One example of a reallylow computational method is dividing the matrix by a large number.Another example, which is less computational, is the Parseval Network.The invention is smarter than Parseval Networks and is less restrictiveon the layer. The invention finds an upper surrogate for the spectralradius, namely equation (2), and then divides the weight matrix by thesquare root of equation (2). It has an alternative form as describedlater.

Indeed, techniques may include a non-expansive network. This is achievedwith the Parseval network by letting W be the weight matrix. But, thiswas also only achieved by also requiring the product of W and W^(T) tobe ortho-normal. The invention also considers a non-expansive but notorthonormal network. This is achieved by measuring a matrix norm ofWW^(T).

In another embodiment, the weight of the matrix can be combined withother techniques such as by using Norm-pooling, using Concatenated ReLU,and using training to increase the confidence gap. Preferably, theinvention combines the weight of the matrix with one of the othertechniques.

With reference to ReLU, ReLU, tanh and sigmoid are non-expansive but donot preserve distance well. Below presents a technique of the inventionthat improves ReLU and is generalizable to other nonlinearities. Adifferent approach to improve sigmoid is shown later.

To understand the weakness of ReLU, two input data points A and B areconsidered, and suppose that a ReLU in the network receives twodifferent negative values for A and B and outputs zero for both.Comparing the A-B distance before and after this ReLU layer, there is adistance loss and this particular ReLU contributes to it. The inventionuse two-sided ReLU which is a function from R to R² and computes ReLU(x)and ReLU(−x). Two sided ReLU is non-expansive with respect to anyLp-norm and it preserves distance in the above scenario. Itseffectiveness is verified later in increasing confidence gaps. Two-sidedReLU is a special case of the following general technique. Let f(x) be anon-expansive and monotonically increasing scalar function, and notethat ReLU, tanh and sigmoid all fit these conditions. The invention candefine a function from R to R² that computes f(x) and f(x)−x (i.e., see‘Lemma 4’ later in description). Such a new function is non-expansivewith respect to any Lp-norm and preserves distance better than f(x)alone.

With reference to pooling (e.g., as exemplarily shown in FIG. 17),max-pooling is non-expansive, but does not preserve distance as much aspossible. For example, consider a scenario where the inputs to poolingare activations that represent edge detection, and consider two images Aand B such that A contains an edge that passes a particular poolingwindow while B does not. Inside this window, A has positive values whileB has all zeroes. For this window, the A-B distance before pooling isthe L2-norm of A's values, yet if max-pooling is used, the A-B distanceafter pooling becomes the largest of A's values, which can besubstantially smaller than the former. Thus, there is a loss of distancebetween A and B while passing this pooling layer.

The invention replaces max-pooling with norm-pooling. Instead of takingthe max of values inside a pooling window, the invention takes theL2-norm of them. Norm-pooling is non-expansive as shown in ‘Lemma 5’ andwould entirely preserve the L2-distance between A and B in thehypothetical scenario above. Other Lp-norms can also be used.

If pooling windows overlap, then the invention divides the input tensorby √K where K is the maximum number of pooling windows in which an entrycan appear, similar to convolution layers discussed earlier.

With reference to using a loss function (e.g., see FIG. 19) to increasethe confidence gap, for a classifier with K labels, the inventionincludes building it as K overlapping L2NNNs, each of which outputs asingle logit for one label. In an architecture with no split layers,this simply implies that these K L2NNNs share all but the last linearlayer and that the last linear layer is decomposed into K single-outputlinear filters, one in each L2NNN. For a multi-L2NNN classifier, theinvention has a guarantee (e.g., see ‘Lemma 6’ below) that theclassifier will not change its answer as long as the input x is modifiedby no more than an L2-norm of g(x)/2, where again g(x) denotes theconfidence gap. As mentioned above, a single-L2NNN classifier has aguarantee of g(x)/√2. Although this seems better on the surface, it ismore difficult to achieve large confidence gaps. Therefore, theinvention will assume the multi-L2NNN approach.

The invention uses a loss function with three terms as shown in equation(3)-(6), with trade-off hyperparameters γ and ω where z is ahyperparameter:

=

_(a)+γ·

_(b)+ω·

_(c)  (3)

Let y₁, y₂, . . . , y_(K) be outputs from the L2NNNs. The first lossterm is

_(a)=softmax-cross-entropy(u ₁ y ₁ ,u ₂ y ₂ , . . . ,u _(K) y_(K),label)  (4)

where u₁, u₂, . . . , u_(K) are trainable parameters. The second lossterm is

_(b)=softmax-cross-entropy(vy ₁ ,vy ₂ , . . . ,vy _(K),label)  (5)

where v can be either a trainable parameter or a hyperparameter. Notethat u₁, u₂, . . . , u_(K) and v are not part of the classifier and arenot used during inference. The third loss term is

$\begin{matrix}{\mathcal{L}_{c} = \frac{{average}\mspace{14mu} \left( {\log \left( {1 - {{softmax}\left( {{zy}_{1},{zy}_{2},\ldots \mspace{14mu},{zy}_{K}} \right)}_{label}} \right)} \right)}{z}} & (6)\end{matrix}$

The rationale for the first loss term (4) is that it mimicscross-entropy loss of an ordinary network. If an ordinary network hasbeen converted to L2NNNs by multiplying each layer with a smallconstant, then its original outputs can be recovered by scaling up L2NNNoutputs with certain constants, which is enabled by the formula (4).Hence, this loss term is meant to guide the training process to discoverany feature that an ordinary network can discover. The rationale for thesecond loss term (5) is that it is directly related to theclassification accuracy.

Multiplying L2NNN outputs uniformly with v does not change the outputlabel and only adapts to the value range of L2NNN outputs and drivetowards better nominal accuracy. The third loss term (6) approximatesaverage confidence gap: the log term is a soft measure of a confidencegap (for a correct prediction), and is asymptotically linear for largergap values. The hyperparameter z controls the degree of softness, andhas relatively low impact on the magnitude of loss due to the divisionby z; if z is increased then (6) asymptotically becomes the average ofminus confidence gaps for correct predictions and zeroes for incorrectpredictions. Therefore, loss (6) encourages large confidence gaps andyet is smooth and differentiable.

A notable variation of equation (3) is one that combines withadversarial training. The invention applies a technique on equation (4)and uses distorted inputs in calculating L_(a). These results areexemplarily shown in FIGS. 3-4.

Adversarial training means replacing the original training data pointswith distorted data points. The distorted data points are found by anadversarial attacker and are such that the current model gives wronganswers. When combining the invention with adversarial training, theinvention has a choice: either use only distorted data points or useboth original training data points and distorted data points.Experiments found that it is benificial to use both because of betterresults: Le is based on original training data points, while La and/orLb are based on distorted data points.

Thereby, the method 100 includes L2-non-expansive neural networks whichare well-conditioned systems by construction. Practical techniques aredeveloped for building these networks. Their properties are studiedthrough experiments (below) and benefits demonstrated, including thatthe MNIST and CIFAR-10 classifiers exceed the state of the art inrobustness against white-box adversarial attacks, that they are robustagainst partially random training labels, and that they outputconfidence gaps which are strongly correlated with robustness andgeneralization. There are a number of future directions, for example,other applications of L2NNN, L2NNN-friendly neural networkarchitectures, and the relation between L2NNNs and interpretability.

Experimental Results

Experiments are divided into three groups to study different propertiesof L2NNNs.

To test robustness, the experiments ran evaluated robustness of L2NNNclassifiers for MNIST and CIFAR-10 and compared against the state of theart Madry et al. (2017). The robustness metric is accuracy underwhite-box non-targeted L2-bounded attacks. The attack code of Carlini &Wagner (2017a) is used. The experiments downloaded the classifiers(i.e., at github.com/MadryLab/mnist_challenge andgithub.com/MadryLab/cifar10_challenge. These models (Model 2's in Tables1 and 2) were built by adversarial training with L∞-bounded adversaries(Madry et al., 2017). Tsipras et al. (2019) from the same lab is theonly paper in the literature that reports on models trained withL2-bounded adversaries, and it reports that training with L2-boundedadversaries resulted in weaker L2 robustness than the L2 robustnessresults from training with L∞-bounded adversaries in Madry et al.(2017). Therefore, the experiment choose to compare against the bestavailable models, even though they were trained with L∞-boundedadversaries. Note also that the inventor's own Model 4's in Tables 1 and2 are trained with the same L∞-bounded adversaries) of Madry et al.(2017) and report their robustness against L2-bounded attacks in FIG. 3.

It is noted that their defense diminishes as the attacks are allowedmore iterations. FIG. 2 illustrates one example of this effect: thefirst image is an attack on MNIST Model 2 (0 recognized as ‘5’) foundafter 1,000 iterations, with noise L2-norm of 4.4, while the secondpicture is one found after 10,000 iterations, the same ‘0’ recognized as‘5’, with noise L2-norm of 2.1. It is hypothesized that adversarialtraining alone provides little absolute defense at the noise levels usedin the two tables: adversarial examples still exist and are only moredifficult to find. The fact that in FIG. 4, Model 2 accuracy is lower inthe 1000×10 row than the 10,000 row further supports our hypothesis.

In contrast, the defense of the L2NNN models remains constant when theattacks are allowed more iterations, specifically MNIST Models beyond10K iterations and CIFAR-10 Models beyond 1000 iterations. The reason isthat L2NNN classifiers achieve their defense by creating a confidencegap between the largest logit and the rest, and that half of this gap isa lower bound of L2-norm of distortion to the input data in order tochange the classification. Hence, L2NNN's defense comes from aminimum-distortion guarantee. Although adversarial training alone mayalso increase the minimum distortion limit for misclassification, assuggested in Carlini et al. (2017) for a small network, that limitlikely does not reach the levels used in FIGS. 3-4 and hence the defensedepends on how likely the attacker can reach a lower-distortionmisclassification. Consequently, when the attacks are allowed to makemore attempts the defense with guarantee stands while the otherdiminishes.

For both MNIST and CIFAR-10, adding adversarial training boosts therobustness of Model 4. It is hypothesized that adversarial traininglowers local Lipschitz constants in certain parts of the input space,specifically around the training images, and therefore makes localrobustness guarantees larger (Hein & Andriushchenko, 2017). To test thishypothesis on MNIST Models 3 and 4, the experiments measure the averageL2-norm of their Jacobian matrices, averaged over the first 1000 imagesin the test set, and the results are 1.05 for Model 3 and 0.83 for Model4. Note that the L2-norm of the Jacobian matrices can be greater than 1for multi-L2NNN classifiers. These measurements are consistent with, butalbeit do not prove, the hypothesis.

To test the effects of various components of the method 100, theexperiments build models for each of which a different technique duringtraining is disabled. The results are shown in FIG. 5. To put theconfidence gap values in context, the inventive MNIST Model 3 has anaverage gap of 2.8. The first one is without weight regularization ofthe weights of the matrix norm and it becomes an ordinary network whichhas little defense against adversarial attacks (i.e., its large averageconfidence gap is meaningless). For the second one, the experimentremoves the third loss term (6) and for the third one the experimentreplaces norm-pooling with regular max-pooling, both resulting in asmaller average confidence gap and less defense against attacks. For thefourth one, the experiment replaces two-sided ReLU with regular ReLU,and this leads to degradation in nominal accuracy, average confidencegap and robustness. Parseval networks can be viewed as models without anLc term, norm-pooling or two-sided ReLU, and with a more restrictivescheme for weight matrix regularization.

Model 3 in FIG. 3 and the second row of FIG. 4 are two points along atrade-off curve that are controllable by varying hyperparameter ω inloss function (3). Other trade-off points have nominal accuracy andunder-attack accuracy of (98.8%, 19.1%), (98.4%, 22.6%) and (97.9%,24.7%) respectively. Similar trade-offs have been reported by otherrobustness works including adversarial training and adversarialpolytope.

Although the experiments primarily focus on defending against L2-boundedadversarial attacks, the method 100 achieves some level of robustnessagainst L∞-bounded attacks as a by-product. FIG. 6 shows the results,again measured with the attack code of Carlini & Wagner (2017a). The o̧values match those used in Raghunathan et al. (2018); Kolter & Wong(2017); Madry et al. (2017). The MNIST L results are on par withRaghunathan et al. (2018); Kolter & Wong (2017) but not as good as Madryet al. (2017). The CIFAR-10 Model 4 is on par with Madry et al. (2017)for an L∞ defense.

With regard to meaningful outputs, it is now discussed how to understandand utilize L2NNNs' output values. The experiments observe strongcorrelation between the confidence gap of L2NNN and the magnitude ofdistortion needed to force it to misclassify (e.g., see FIGS. 10-12).

In the experiment, test data is sorted by the confidence gap of aclassifier on each image. Then, the experiment divides the sorted datainto 10 bins and report accuracy separately on each bin in FIG. 7. Thisexperiment is repeated for Model 2 (Madry et al., 2017) and the Model 3of FIGS. 3-4. It is noted that the L2NNN model shows better correlationbetween confidence and robustness. For MNIST, the first bin is 95%robust and the second bin is 67% robust. This indicates that the L2NNNoutputs are much more quantitatively meaningful than those of ordinaryneural networks.

It is an important property that an L2NNN has an easily accessiblemeasurement on how robust its decisions are. Since robustness is easilymeasurable, it can be optimized directly, and this is the primary reasonthat the experiments can demonstrate the robustness results of FIGS.3-4. This can also be valuable in real-life applications where we needto quantify how reliable a decision is. One of the other practicalimplications of this property is that the invention can form hybridmodels which use L2NNN outputs when the confidence is relatively high(e.g., higher than a given threshold) and a different model when theconfidence of the L2NNN is relatively low (e.g., lower than a giventhreshold). This creates another dimension of trade-off between nominalaccuracy and robustness that one can take advantage of in anapplication. The invention built such a hybrid model for MNIST with theswitch threshold of 1.0 and achieved nominal accuracy of 99.3%, whereonly 6.9% of images were delegated to the alternative classifier. And,the invention built such a hybrid model for CIFAR-10 with the switchthreshold of 0.1 and achieved nominal accuracy of 89.4%, where 25% ofimages were delegated. To put these threshold values in context, MNISTModel 3 has an average gap of 2.8 and CIFAR-10 Model 3 has an averagegap of 0.34. In other words, if for a data point the L2NNN confidencegap is substantially below average, then the classification is delegatedto the alternative classifier, and, in this way the invention canrecover nominal accuracy at a moderate cost of robustness.

With reference to results for generalization versus memorizationtradeoff, experiments were run that study L2NNN's generalization througha noisy-data experiment where the experiments randomize some or allMNIST training labels. The setup is similar to Zhang et al. (2017),except that the experiments added three scenarios where 25%, 50% and 75%of training labels are scrambled.

FIG. 8 shows the comparison between L2NNNs and ordinary networks.Dropout rate and weight-decay weight are tuned for each WD/DR run, andeach WD+DR+ES run uses the combined hyper-parameters from its row. Inearly-stopping runs, 5000 training images are withheld as validation setand training stops when loss on validation set stops decreasing. TheL2NNNs do not use weight decay, dropout or early stopping. L2NNNsachieve the best accuracy in all three partially-scrambled scenarios,and it is remarkable that an L2NNN can deliver 93.1% accuracy on testset when three quarters of training labels are random. More detaileddata and discussions are later.

To illustrate why L2NNNs generalize better than ordinary networks fromnoisy data, FIG. 9 shows trade-offpoints between accuracy and confidencegap on the 50% scrambled training set. These trade-offpoints areachieved by changing hyperparameters ω in (3) and v in (5). In a noisytraining set, there exist data points that are close to each other yethave different labels. For a pair of such points, if an L2NNN is toclassify both points correctly, then the two confidence gaps must besmall. Therefore, in order to achieve large average confidence gap, anL2NNN must misclassify some of the training data. In FIG. 9, as theexperiment adjusts the loss function to favor larger average gap, theL2NNNs are forced to make more and more mistakes on the training set.The results suggest that loss is minimized when an L2NNN misclassifiessome of the scrambled labels while fitting the 50% original labels withlarge gaps, and parameter training discovers this trade-offautomatically. Hence, the experiments show in FIG. 9 increasingaccuracies and gaps on the test set. The above is a trade-off betweenmemorization (training-set accuracy) and generalization (training-setaverage gap), and it is hypothesized that L2NNN's trade-off betweennominal accuracy and robustness, as shown above, is due to the samemechanism. Dropout and early stopping are also able to sacrificeaccuracy on a noisy training set, however they do so through differentmechanisms that tend to be brittle, and FIG. 8 suggests that L2NNN'smechanism is superior. More discussions and the trade-off tables for 25%and 75% scenarios (e.g., as shown in FIGS. 15-16).

Another interesting observation is that the average confidence gapdramatically shrinks in the last row of FIG. 8 where the training ispure memorization. This is not surprising again, due to training datapoints that are close to each other yet have different labels. Thepractical implication is that after an L2NNN model is trained, one cansimply measure its average confidence gap to know whether and how muchit has learned to generalize rather than to memorize the training data.

L2-Non-Expansive Network Components

The method 100 can include different techniques for weightregularization. For example, there are numerous ways to utilize thebound of (2). The main text describes a simple method of W′=W√(b(W)) toenforce strict non-expansiveness. The following is an alternative.Approximate non-expansiveness can be achieved by adding a penalty to theloss function whenever b (W) exceeds 1, for example of equation (7):

$\begin{matrix}{{\mathcal{L}_{W} = {\min \left( {{l\left( {W^{T}W} \right)},{l\left( {WW}^{T} \right)}} \right)}},{{{where}\mspace{14mu} {l(M)}} = {\sum\limits_{i}{\max\left( {{{\sum\limits_{j}{M_{i,j}}} - 1},0} \right)}}}} & (7)\end{matrix}$

The sum of (7) losses over all layers becomes a fourth term in the lossfunction (3), multiplied with one additional hyperparameter. This wouldlead to an approximate L2NNN with trade-offs between how much its layersviolate (1) with surrogate (2) versus other objectives in the lossfunction.

In practice, it is found that it is beneficial to begin neural networktraining with the regularization scheme of (7), which allows largerlearning rates, and switch to the first scheme of using W′, which avoidsartifacts of an extra hyperparameter, when close to convergence. Ofcourse, if the goal is building approximate L2NNNs, then one can use (7)all the way.

For sigmoids and others, a sigmoid is non-expansive as is, but does notpreserve distance as much as possible. A better way is to replacesigmoid with the following operator of equation (8):

$\begin{matrix}{{s(x)} = {t \cdot {{sigmoid}\left( \frac{4x}{t} \right)}}} & (8)\end{matrix}$

wheret>0 is a trainable parameter and each neuron has its own t. Ingeneral, the requirement for any scalar nonlinearity is that itsderivative is bounded between ‘−1’ and ‘1’. If a nonlinearity violatesthis condition, then a shrinking multiplier can be applied. If theactual range of derivative is narrower, as in the case of sigmoid, thenan enlarging multiplier can be applied to preserve distance.

For further improvement, (8) can be combined with the general form ofthe two-sided ReLU. Then the new nonlinearity is a function from R to R²that computes s(x) and s(x)−x.

With regards to splitting and convergence (e.g., as shown in FIG. 18),there are different kinds of splitting in neural networks. Somesplitting is not followed by re-convergence. For example, a classifiermay have common layers followed by split layers for each label, and suchan architecture can be viewed as multiple L2NNNs that overlap at thecommon layers and each contain one stack of split layers. In such cases,no modification is needed because there is no splitting within eachindividual L2NNN.

Some splitting, however, is followed by re-convergence. In fact,convolution and pooling layers discussed earlier can be viewed assplitting, and re-convergence happens at the next layer. Another commonexample is skip-level connections such as in ResNet. Such splittingshould be viewed as making two copies of a certain vector. Let thebefore-split vector be x0, and one makes two copies as equation (9):

x ₁ =t·x ₀ x ₂=√{square root over (1−t ²)}·x ₀  (9)

where tε[0, 1] is a trainable parameter.

In the case of ResNet, the re-convergence is an add operator, whichshould be treated as vector-matrix multiplication as in the above weightdescriptions, but with much simplified forms. Let x₁ be the skip-levelconnections and f(x₂) be the channels of convolution outputs to be addedwith x₁, and this is performed as the addition as:

y=t·x ₁+√{square root over (1−t ² ·f)}(x ₂)  (10)

where tε[0, 1] is a trainable parameter and could be a common parameterwith (9).

ResNet-like re-convergence is referred to as aggregation layers in Cisseet al. (2017) and a different formula (11) was used as:

y=α·x ₁+(1−α)·f(x ₂)  (11)

In (11), αε [0, 1] is a trainable parameter. Because splitting is notmodified in Cisse et al. (2017), their scheme may seem approximatelyequivalent to the invention if a common t parameter is used for (9) and(10). However, there is a substantial difference: in many ResNet blocks,f(x₂) is a subset of rather than all of the output channels ofconvolution layers, and our scheme does not apply the shrinking factorof √1−t2 on channels that are not part of f (x₂) and therefore betterpreserve distances. In contrast, because splitting is not modified inthe invention, at re-convergence the scheme of Cisse et al. (2017) mustapply the shrinking factor of 1−α on all outputs of convolution layers,regardless of whether a channel is part of the aggregation or not. Tostate the difference in more general terms, the inventive scheme enablessplitting and re-convergence at arbitrary levels of granularity andmultiplies shrinking factors to only the necessary components. It isnoted that the invention can also have a different t per channel or evenper entry.

For recursion, there are multiple ways to interpret recurrent neuralnetworks (RNN) as L2NNNs. One way is to view an unrolled RNN as multipleoverlapping L2NNNs where each L2NNN generates the output at one timestep. Under this interpretation, nothing special is needed and recurrentinputs to a neuron are simply treated as ordinary inputs.

Another way to interpret an RNN is to view unrolled RNN as a singleL2NNN that generates outputs at all time steps. Under thisinterpretation, recurrent connections are treated as splitting at theirsources and should be handled as in (9).

For normalization, normalization operations are limited in an L2NNN.Subtracting mean is allowed, and the subtract-mean operation can beperformed on arbitrary subsets of any layer. Subtracting batch mean isalso allowed because it can be viewed as subtracting a bias parameter.However, scaling (e.g., division by standard deviation or batch standarddeviation) is only allowed if the multiplying factors are no greaterthan 1.

For example, with MNIST images, MNIST images with the largest confidencegaps are shown in FIG. 10 and those with the smallest confidence gaps inFIG. 11. They include images before and after attacks as well as Model3's confidence gap, the misclassified label and L2-norm of the addednoise. The images with large confidence gaps seem to be ones that aremost different from other digits, while some of the images with smallconfidence gaps are genuinely ambiguous. It is worth noting the strongcorrelation between the confidence gap of L2NNN and the magnitude ofdistortion needed to force it to misclassify. Also, it is noted that theinvention guarantees states that the minimum L2-norm of noise is half ofthe confidence gap, but in reality the needed noise is much strongerthan the guarantee. The reason is that the true local guarantee is infact larger due to local Lipschitz constants.

FIG. 12 shows additional details regarding the example in FIG. 2. Thefirst image is the original image of a zero. The second image is anattack on Model 2 (Madry et al., 2017) found after 1,000 iterations,with noise L2-norm of 4.4. The third is one found after 10,000iterations for Model 2, with noise L2-norm of 2.1. The last image is thebest attack on the Model 3 found after one-million iterations, withnoise L2-norm of 3.5. These illustrate the trend shown in FIG. 3 thatthe defense by adversarial training diminishes as the attacks areallowed more iterations, while L2NNNs with stand strong attacks and itrequires more noise to fool an L2NNN. It is worth noting that the slowdegradation of Model 2's accuracy is an artifact of the attacker(Carlini & Wagner, 2017a): when gradients are near zero in some parts ofthe input space, which is true for the MNIST Model 2 due to adversarialtraining, it takes more iterations to make progress. It is conceivablethat, with a more advanced attacker, Model 2 could drop quickly to 7.6%.What truly matters are the robust accuracies where the inventors advancethe state of the art from 7.6% to 24.4%.

Scrambled-Label Experiments

For ordinary networks in FIG. 8, two network architectures are used. Thefirst has four layers. The second has 22 layers and is the architectureof Models 3 and 4 in FIG. 3, which includes norm-pooling and two-sidedReLU. Results of ordinary networks using these two architectures are inFIGS. 13-14, respectively. The ordinary-network section of FIG. 8 is anentry-wise max of FIGS. 13-14.

In FIGS. 13-14, dropout rate and weight-decay weight are tuned for eachWD/DR run, and each WD+DR+ES run uses the combined hyperparameters fromits row. In early-stopping runs, 5000 training images are withheld asvalidation set and training stops when loss on validation set stopsdecreasing. Each ES or WD+DR+ES entry is an average over ten runs toaccount for randomness of the validation set. The L2NNNs do not useweight decay, dropout or early stopping.

FIG. 15 shows L2NNN trade-off points between an accuracy and aconfidence gap on the 25%-scrambled training set. FIG. 16 shows L2NNNtrade-offpoints between an accuracy and a confidence gap on the75%-scrambled training set. Like FIG. 9, they demonstrate the trade-offmechanism between a memorization (training-set accuracy) and ageneralization (training-set average gap).

It is noted that dropout and early stopping are also able to sacrificeaccuracy on a noisy training set. For example, the DR run in the50%-scrambled row in FIG. 13 has 67.5% accuracy on the training set and72.6% on the test set. However, the underlying mechanisms are verydifferent from that of L2NNN. Dropout has an effect of dataaugmentation, and, with a noisy training set, dropout can create asituation where the effective data complexity exceeds the networkcapacity. Therefore, the parameter training is stalled at a loweredaccuracy on the training set, and the invention gets better performanceif the model tends to fit more of original labels and less of thescrambled labels. The mechanism of early stopping is straightforward andsimply stops the training when it is mostly memorizing scrambled labels.The invention gets better performance from early stopping if theparameter training tends to fit the original labels early. Thesemechanisms from dropout and early stopping are both brittle and may notallow parameter training enough opportunity to learn from the usefuldata points with original labels. The comparison in FIG. 8 suggests thatthey are inferior to L2NNN's trade-off mechanism illustrated in FIGS. 9,15, and 16. The L2NNNs in the invention do not use weight decay, dropoutor early stopping. However, it is conceivable that dropout may becomplementary to L2NNNs.

Proofs Including Lemmas

Lemma 1: let g (x) denote a single-L2NNN classifier's confidence gap foran input data point x. The classifier will not change its answer as longas the input x is modified by no more than an L2-norm of g(x)/√2.

Proof of Lemma 1: let y(x)=[y1 (x), y2 (x), . . . , yK (x)] denote logitvector of a single-L2NNN classifier for an input data point x. Let x1and x2 be two input vectors such that the classifier outputs differentlabels i and j. By definitions, one has the following inequalities of(12):

Yi(x ₁)−Yj(x ₁)≥g(x ₁)Yi(x ₂)−Yj(x ₂)≤0  (12)

Because the classifier is a single L2NNN, it must be true that (i.e., asshown in (13)):

$\begin{matrix}{{{{x_{2} - x_{1}}}_{2} \geq {{{y\left( x_{2} \right)} - {y\left( x_{1} \right)}}}_{2} \geq \sqrt{\left( {{y_{i}\left( x_{2} \right)} - {y_{i}\left( x_{1} \right)}} \right)^{2} + \left( {{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}} \right)^{2}}} = {{\sqrt{\left( {{y_{i}\left( x_{1} \right)} - {y_{i}\left( x_{2} \right)}} \right)^{2} + \left( {{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}} \right)^{2}} \geq \sqrt{\frac{\left( {{y_{i}\left( x_{1} \right)} - {y_{i}\left( x_{2} \right)}} \right) + \left( {{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}} \right)^{2}}{2}}} = {{\sqrt{\frac{\left( {\left( {{y_{i}\left( x_{1} \right)} - {y_{j}\left( x_{2} \right)}} \right) + \left( {{y_{j}\left( x_{2} \right)} - {y_{i}\left( x_{2} \right)}} \right)} \right)^{2}}{2}} \geq \sqrt{\frac{\left( {{g\left( x_{1} \right)} + 0} \right)^{2}}{2}}} = {{g\left( x_{1} \right)}/\sqrt{2}}}}} & (13)\end{matrix}$

Lemma 2: let g(x) denote a classifier's confidence gap for an input datapoint x. Let d (x₁, x₂) denote the L2-distance between the outputlogit-vectors for two input points x₁ and x₂ that have different labelsand that are classified correctly. Then this condition holds: g(x1)+g(x2)≥√2·d(x₁, x₂).

Proof for Lemma 2: let y(x)=[y1 (x), y2 (x), . . . , yK (x)] denotelogit vector of a classifier for an input data point x. Let i and j bethe labels for x₁ and x₂. By definitions, there are the followinginequalities of (14):

Yi(x ₁)−Yj(x ₁)≥g(x ₁)Yj(x ₂)−Yi(x ₂)≥g(x ₂)  (14)

Therefore, it follows that (15) is true:

$\begin{matrix}{{{d\left( {x_{1},x_{2}} \right)} \geq {{{y\left( x_{2} \right)} - {y\left( x_{1} \right)}}}_{2} \geq \sqrt{\left( {{y_{i}\left( x_{2} \right)} - {y_{i}\left( x_{1} \right)}} \right)^{2} + \left( {{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}} \right)^{2}}} = {{\sqrt{\left( {{y_{i}\left( x_{1} \right)} - {y_{i}\left( x_{2} \right)}} \right)^{2} + \left( {{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}} \right)^{2}} \geq \sqrt{\frac{\left( {{y_{i}\left( x_{1} \right)} - {y_{i}\left( x_{2} \right)}} \right) + \left( {{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}} \right)^{2}}{2}}} = {{\sqrt{\frac{\left( {\left( {{y_{i}\left( x_{1} \right)} - {y_{j}\left( x_{2} \right)}} \right) + \left( {{y_{j}\left( x_{2} \right)} - {y_{i}\left( x_{2} \right)}} \right)} \right)^{2}}{2}} \geq \sqrt{\frac{\left( {{g\left( x_{1} \right)} + {g\left( x_{2} \right)}} \right)^{2}}{2}}} = \frac{{g\left( x_{1} \right)} + {g\left( x_{2} \right)}}{\sqrt{2}}}}} & (15)\end{matrix}$

Lemma 3: for any a≥0, b≥0, p≥1, the following inequality holds:a^(p)+b^(p)≤(a+b)^(p).

Proof for Lemma 3: If a and b are both zero, then the inequality holds.If at least one of a and b is nonzero as in (16):

$\begin{matrix}{{a^{p} + b^{p}} = {{{{\left( {a + b} \right)^{p} \cdot \left( \frac{a}{a + b} \right)^{p} \cdot \left( \frac{a}{a + b} \right)^{p}} + {\left( {a + b} \right)^{p} \cdot \left( \frac{b}{a + b} \right)^{p}}} \leq {{\left( {a + b} \right)^{p}\  \cdot \frac{a}{a + b}} + {\left( {a + b} \right)^{p} \cdot \ \frac{b}{a + b}}}} = \left( {a + b} \right)^{p}}} & (16)\end{matrix}$

Lemma 4: let f(x) be a non-expansive and monotonically increasing scalarfunction. Define a function from R to R²: h(x)=[f(x), f(x)−x]. Then h(x)is non-expansive with respect to any L_(p)-norm.

Proof of Lemma 4: for any x1>x2, by definition there is the followinginequalities of (17):

f(x ₁)−f(x ₂)≥0f(x ₁)−f(x ₂)≤x ₁ −x ₂  (17)

And, for any p≥1, invoking Lemma 3 with a=f(x₁)−f(x₂) andb=x₁−x₂−f(x₁)+f(x₂), (18) is shown as:

((f(x ₁)−f(x ₂))^(p)+(x ₁ −x ₂ −f(x ₁)+f(x ₂))^(p)≤(x ₁ −x ₂)^(p)(((f(x₁)−f(x ₂))^(p)+(x ₁ −x ₂ −f(x ₁)+f(x ₂))^(p))^(1/p) ≤x ₁ −x ₂(|f(x₁)−f(x ₂)|^(p)+|(f(x ₁)−x ₁)−(f(x ₂)−x ₂)|^(p))^(1/p) ≤x ₁ −x ₂ ∥h(x₁)−h(x ₂)∥_(p) ≤x ₁ −x ₂  (18)

Lemma 5: norm-pooling within each pooling window is a non-expansive mapwith respect to L2-norm.

Proof of Lemma 5: Let x₁ and x₂ be two vectors with the size of apooling window. By triangle inequality, (19) follows as:

∥x ₁ −x ₂∥₂ +∥x ₁∥₂ ≥∥x ₂∥₂ ∥x ₁ −x ₂∥₂ +∥x ₂∥₂ ≥∥x ₁∥₂  (19)

Therefore,

∥x ₁ −x ₂∥₂ ≥∥x ₂∥₂ −∥x ₁∥₂ ∥x ₁ −x ₂∥₂ ≥∥x ₁∥₂ −∥x ₂∥₂  (20)

Therefore,

∥x ₁ −x ₂∥₂ ≥∥|x ₁∥₂ −∥x ₂∥₂|  (21)

Lemma 6: let g (x) denote a multi-L2NNN classifier's confidence gap foran input data point x. The classifier will not change its answer as longas the input x is modified by no more than an L2-norm of g(x)/2.

Proof of Lemma 6: let y(x)=[y₁(x), y₂(x), . . . , y_(K) (x)] denotelogit vector of a multi-L2NNN classifier for an input data point x. Letx₁ and x₂ be two input vectors such that the classifier outputsdifferent labels i and j. By definitions, one has the followinginequalities of (22)-(24):

Yi(x ₁)−Yj(x ₁)≥g(x ₁)Yi(x ₂)−Yj(x ₂)≤0  (22)

For a multi-L2NNN classifier, each logit is a nonexpansive function ofthe input, and it must be true that:

$\begin{matrix}{\mspace{20mu} {{{{x_{2} - x_{1}}}_{2} \geq {{{y_{i}\left( x_{1} \right)} - {y_{i}\left( x_{2} \right)}}}}\mspace{20mu} {{{x_{2} - x_{1}}}_{2} \geq {{{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}}}}\mspace{20mu} {{Therefore},}}} & (23) \\{{{{x_{2} - x_{1}}}_{2} \geq \frac{{{{y_{i}\left( x_{1} \right)} - {y_{i}\left( x_{2} \right)}}} + {{{y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}}}}{2} \geq \frac{{{y_{i}\left( x_{1} \right)} - {y_{i}\left( x_{2} \right)} + {y_{j}\left( x_{2} \right)} - {y_{j}\left( x_{1} \right)}}}{2}} = {{\frac{{\left( {{y_{i}\left( x_{1} \right)} - {y_{j}\left( x_{1} \right)}} \right) + \left( {{y_{j}\left( x_{2} \right)} - {y_{i}\left( x_{2} \right)}} \right)}}{2} \geq \frac{{{g\left( x_{1} \right)} + 0}}{2}} = {{g\left( x_{1} \right)}/2}}} & (24)\end{matrix}$

Exemplary Aspects, Using a Cloud Computing Environment

Although this detailed description includes an exemplary embodiment ofthe present invention in a cloud computing environment, it is to beunderstood that implementation of the teachings recited herein are notlimited to such a cloud computing environment. Rather, embodiments ofthe present invention are capable of being implemented in conjunctionwith any other type of computing environment now known or laterdeveloped.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client circuits through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 20, a schematic of an example of a cloud computingnode is shown. Cloud computing node 10 is only one example of a suitablenode and is not intended to suggest any limitation as to the scope ofuse or functionality of embodiments of the invention described herein.Regardless, cloud computing node 10 is capable of being implementedand/or performing any of the functionality set forth herein.

Although cloud computing node 10 is depicted as a computer system/server12, it is understood to be operational with numerous other generalpurpose or special purpose computing system environments orconfigurations. Examples of well-known computing systems, environments,and/or configurations that may be suitable for use with computersystem/server 12 include, but are not limited to, personal computersystems, server computer systems, thin clients, thick clients, hand-heldor laptop circuits, multiprocessor systems, microprocessor-basedsystems, set top boxes, programmable consumer electronics, network PCs,minicomputer systems, mainframe computer systems, and distributed cloudcomputing environments that include any of the above systems orcircuits, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingcircuits that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage circuits.

Referring now to FIG. 20, a computer system/server 12 is shown in theform of a general-purpose computing circuit. The components of computersystem/server 12 may include, but are not limited to, one or moreprocessors or processing units 16, a system memory 28, and a bus 18 thatcouples various system components including system memory 28 toprocessor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnects (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further described below, memory 28 mayinclude a computer program product storing one or program modules 42comprising computer readable instructions configured to carry out one ormore features of the present invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may be adapted for implementation in anetworking environment. In some embodiments, program modules 42 areadapted to generally carry out one or more functions and/ormethodologies of the present invention.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing circuit, other peripherals,such as display 24, etc., and one or more components that facilitateinteraction with computer system/server 12. Such communication can occurvia Input/Output (I/O) interface 22, and/or any circuits (e.g., networkcard, modem, etc.) that enable computer system/server 12 to communicatewith one or more other computing circuits. For example, computersystem/server 12 can communicate with one or more networks such as alocal area network (LAN), a general wide area network (WAN), and/or apublic network (e.g., the Internet) via network adapter 20. As depicted,network adapter 20 communicates with the other components of computersystem/server 12 via bus 18. It should be understood that although notshown, other hardware and/or software components could be used inconjunction with computer system/server 12. Examples, include, but arenot limited to: microcode, circuit drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, and data archivalstorage systems, etc.

Referring now to FIG. 21, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment 50 comprises one or morecloud computing nodes 10 with which local computing circuits used bycloud consumers, such as, for example, personal digital assistant (PDA)or cellular telephone 54A, desktop computer 54B, laptop computer 54C,and/or automobile computer system 54N may communicate. Nodes 10 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingcircuit. It is understood that the types of computing circuits 54A-Nshown in FIG. 21 are intended to be illustrative only and that computingnodes 10 and cloud computing environment 50 can communicate with anytype of computerized circuit over any type of network and/or networkaddressable connection (e.g., using a web browser).

Referring now to FIG. 22, an exemplary set of functional abstractionlayers provided by cloud computing environment 50 (FIG. 21) is shown. Itshould be understood in advance that the components, layers, andfunctions shown in FIG. 22 are intended to be illustrative only andembodiments of the invention are not limited thereto. As depicted, thefollowing layers and corresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include: mainframes 61; RISC(Reduced Instruction Set Computer) architecture based servers 62;servers 63; blade servers 64; storage circuits 65; and networks andnetworking components 66. In some embodiments, software componentsinclude network application server software 67 and database software 68.

Virtualization layer 70 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers71; virtual storage 72; virtual networks 73, including virtual privatenetworks; virtual applications and operating systems 74; and virtualclients 75.

In one example, management layer 80 may provide the functions describedbelow. Resource provisioning 81 provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricing 82provide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal 83 provides access to the cloud computing environment forconsumers and system administrators. Service level management 84provides cloud computing resource allocation and management such thatrequired service levels are met. Service Level Agreement (SLA) planningand fulfillment 85 provide pre-arrangement for, and procurement of,cloud computing resources for which a future requirement is anticipatedin accordance with an SLA.

Workloads layer 90 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation 91; software development and lifecycle management 92; virtualclassroom education delivery 93; data analytics processing 94;transaction processing 95; and training method 100 in accordance withthe present invention.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

Further, Applicant's intent is to encompass the equivalents of all claimelements, and no amendment to any claim of the present applicationshould be construed as a disclaimer of any interest in or right to anequivalent of any element or feature of the amended claim.

What is claimed is:
 1. A computer-implemented training method for an L2non-expansive neural network, the method comprising: training a neuralnetwork including: using two-sided ReLU as a non-linear function ornorm-pooling as a non-linear function; and increasing a confidence gap.2. The method of claim 1, wherein a penalty is added when a value of acomputed matrix in the training is greater than one, where one is aninteger.
 3. The method of claim 2, wherein the non-linear function ofthe two-sided ReLU comprises a non-expansive and monotonicallyincreasing scalar function.
 4. The method of claim 1, wherein theconfidence gap is increased via a loss function that comprises: a firstterm that mimics cross-entropy loss of an ordinary network; a secondterm that is directly related to the classification accuracy; and athird term that approximates an average confidence gap.
 5. The method ofclaim 1, wherein the third term includes a log term that is a softmeasure of the confidence gap and is asymptotically linear for a gapvalue having a value greater than a threshold value.
 6. The method ofclaim 1, wherein the confidence gap is increased via a loss functionthat grows faster than cross-entropy does.
 7. The method of claim 1,embodied in a cloud-computing environment.
 8. A computer program productfor training an L2 non-expansive neural network, the computer programproduct comprising a computer-readable storage medium having programinstructions embodied therewith, the program instructions executable bya computer to cause the computer to perform: training a neural networkincluding: using two-sided ReLU as a non-linear function or norm-poolingas a non-linear function; and increasing a confidence gap.
 9. Thecomputer program product of claim 8, wherein a penalty is added when avalue of a computed matrix in the training is greater than one, whereone is an integer.
 10. The computer program product of claim 8, whereinthe non-linear function of the two-sided ReLU comprises a non-expansiveand monotonically increasing scalar function.
 11. The computer programproduct of claim 8, wherein the confidence gap is increased via a lossfunction that comprises: a first term that mimics cross-entropy loss ofan ordinary network; a second term that is directly related to theclassification accuracy; and a third term that approximates an averageconfidence gap.
 12. The computer program product of claim 8, wherein thethird term includes a log term that is a soft measure of the confidencegap and is asymptotically linear for a gap value having a value greaterthan a threshold value.
 13. The computer program product of claim 8,wherein the confidence gap is increased via a loss function that growsfaster than cross-entropy does.
 14. A training system for an L2non-expansive neural network, the system comprising: a processor; and amemory, the memory storing instructions to cause the processor toperform: training a neural network including: using two-sided ReLU as anon-linear function; and increasing a confidence gap; and furthertraining such that the network comprises a non-expansive network. 15.The system of claim 14, wherein a penalty is added when a value of acomputed matrix in the training is greater than one, where one is aninteger.
 16. The system of claim 14, wherein the non-linear function ofthe two-sided ReLU comprises a non-expansive and monotonicallyincreasing scalar function.
 17. The system of claim 14, wherein theconfidence gap is increased via a loss function that comprises: a firstterm that mimics cross-entropy loss of an ordinary network; a secondterm that is directly related to the classification accuracy; and athird term that approximates an average confidence gap.
 18. The systemof claim 14, wherein the third term includes a log term that is a softmeasure of the confidence gap and is asymptotically linear for a gapvalue having a value greater than a threshold value.
 19. The system ofclaim 14, wherein the confidence gap is increased via a loss functionthat grows faster than cross-entropy does.
 20. The system of claim 14,embodied in a cloud-computing environment.